package com.itheima.excel;

import com.alibaba.excel.EasyExcel;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class EasyExcelWriteDemo {
    public static void main(String[] args) {

        List<Emp> empList = new ArrayList<>();
        empList.add(new Emp(1,"Tom1",10,"男","测试数据111"));
        empList.add(new Emp(2,"Tom2",11,"男","测试数据222"));
        empList.add(new Emp(3,"Tom3",12,"男","测试数据333"));
        empList.add(new Emp(4,"Tom4",13,"男","测试数据444"));
        empList.add(new Emp(5,"Tom5",14,"男","测试数据555"));
        empList.add(new Emp(6,"Tom6",15,"男","测试数据666"));

        EasyExcel.write(new File("D:/3.xlsx"), Emp.class).sheet("笑傲江湖").doWrite(empList);
    }
}
